# -*- coding: utf-8 -*-
# Copyright 2011-2012 MagiCycles.com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


from django.conf.urls.defaults import patterns,include

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()

urlpatterns = patterns('views',
    # Example:
    # (r'^src/', include('src.foo.urls')),
    (r'^$', 'index'),
    (r'^(?i)donate/{0,1}$', 'donate'),
    (r'^(?i)tos/{0,1}$', 'tos'),
    (r'^(?i)upload/{0,1}$', 'upload'),
    (r'^(?i)indevelop/{0,1}$', 'indevelop'),
    (r'^(?i)search/{0,1}$', 'search'),
    (r'^localjs/(?P<scriptname>[\S]+)$','localjavascript'),
    (r'^(?i)login/{0,1}$', 'login'),
    (r'^(?i)login/(?P<outsite>[\S]+)$', 'outsitelogin'),
    (r'^(?i)connect/(?P<outsite>[\S]*)$', 'connectoutsite'),
    (r'^(?i)logout/{0,1}$', 'logout'),
    (r'^(?i)queue/(?P<action>[\S]+)$', 'do_queue'),
	(r'^(?i)apis/', include('apis.urls')),
    (r'^(?i)oauth/', include('oauth.urls')),
    (r'^(?i)routes/', include('routes.urls')),
    (r'^(?i)rides/', include('routes.rides_urls')),
    (r'^(?i)riders/', include('riders.urls')),
)

from views import error404, error500
handler404 = error404
handler500 = error500
